package com.yycx.module.weixin.provider.controller;

import com.yycx.common.mybatis.model.ResultBody;
import com.yycx.common.springmvc.base.BaseController;
import com.yycx.module.weixin.client.entity.SysWechatTemplate;
import com.yycx.module.weixin.provider.service.SysWechatTemplateService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import java.util.Map;


/**
 * 公众号模板消息表控制器
 *
 * @author flyme
 * @date 2022-06-07
 */
@RestController
@RequestMapping("/bus/bwt/")
public class BusWechatTemplateController extends BaseController<SysWechatTemplateService, SysWechatTemplate> {

    @ApiOperation(value = "公众号模板消息表-分页列表", notes = "公众号模板消息表分页列表")
    @GetMapping(value = "page")
    public ResultBody pageList(@RequestParam(required = false) Map params) {
        return bizService.pageList(params);
    }

    @ApiOperation(value = "公众号模板消息表-列表", notes = "公众号模板消息表列表")
    @GetMapping(value = "list")
    public ResultBody list(@RequestParam(required = false) Map params) {
        return bizService.listEntityMap(params);
    }

    @ApiOperation(value = "公众号模板消息表-添加", notes = "添加公众号模板消息表")
    @PostMapping(value = "save")
    public ResultBody save(@RequestParam(required = false) Map params) {
        return bizService.add(params);
    }

    @ApiOperation(value = "公众号模板消息表-更新", notes = "更新公众号模板消息表")
    @PostMapping(value = "update")
    public ResultBody update(@RequestParam(required = false) Map params) {
        return bizService.edit(params);
    }

    @ApiOperation(value = "公众号模板消息表-删除", notes = "删除公众号模板消息表")
    @PostMapping(value = "remove")
    public ResultBody remove(@RequestParam(required = false) Map params) {
        return bizService.delete(params);
    }


    @ApiOperation(value = "公众号模板消息表-详情", notes = "公众号模板消息表详情")
    @GetMapping(value = "get")
    public ResultBody get(@RequestParam(required = false) Map params) {
        return bizService.get(params);
    }

}
